<?php
/**
 * Created by PhpStorm.
 * User: 刘凯龙
 * Date: 2018/9/3
 * Time: 10:37
 */
use yii\helpers\Html;
use yii\grid\GridView;
use \yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Check';
$this->params[ 'breadcrumbs' ][] = $this->title;
?>
<div class = "wrapper wrapper-content animated fadeInRight">
    <div class = "row">
        <div class = "col-sm-12">
            <div class = "ibox float-e-margins">
                <div class = "ibox-content">
                    <div class="img-box" style="position: fixed;z-index: 100;background: #232321;display: none;height:90%;width: 40%;">
                        <img src=""  style="height:100%;width: 100%;">
                    </div>
                    <div class = "table-responsive">
                        <?= GridView::widget( [
                            'dataProvider'  => $dataProvider ,
                            'filterModel'   => $searchModel ,
                            'layout'        => '{summary}{items}<div class="text-right tooltip-demo">{pager}</div>' ,
                            'rowOptions'    => [ 'class' => 'text-center' ] ,
                            'pager'         => [
                                'firstPageLabel' => "首页" ,
                                'prevPageLabel'  => '上一页' ,
                                'nextPageLabel'  => '下一页' ,
                                'lastPageLabel'  => '尾页' ,
                            ] ,
                            'columns'       => [
                                [
                                    'class' => 'yii\grid\SerialColumn' ,
                                    'headerOptions' => [  'style' => ['width' => '60','color'=>'#337ab7' ]] ,
                                ] ,
                                [
                                    'label'         => '调度方项目名称' ,
                                    'format'        => 'raw' ,
                                    'filter'        => FALSE ,
                                    'value'         => function ( $model ) {
                                        return  $model->p_name ;
                                    } ,
                                    'headerOptions' => [  'style' => ['width' => '60','color'=>'#337ab7' ]] ,
                                ] ,
                                [
                                    'label'         => '调度方项目负责人' ,
                                    'format'        => 'raw' ,
                                    'filter'        => FALSE ,
                                    'value'         => function ( $model ) {
                                        return  $model->p_leader ;
                                    } ,
                                    'headerOptions' => [  'style' => ['width' => '60','color'=>'#337ab7' ]] ,
                                ] ,
                                [
                                    'label'         => '被调度方项目名称' ,
                                    'format'        => 'raw' ,
                                    'filter'        => FALSE ,
                                    'value'         => function ( $model ) {
                                        return  $model->b_name ;
                                    } ,
                                    'headerOptions' => [  'style' => ['width' => '60','color'=>'#337ab7' ]] ,
                                ] ,
                                [
                                    'label'         => '被调度方项目负责人' ,
                                    'format'        => 'raw' ,
                                    'filter'        => FALSE ,
                                    'value'         => function ( $model ) {
                                        return  $model->b_leader ;
                                    } ,
                                    'headerOptions' => [  'style' => ['width' => '60','color'=>'#337ab7' ]] ,
                                ] ,

                                'name',
                                'model',
                                'request_time',
                                'request_num',
                                'buy_time',
                                [
                                    'label'         => '图片' ,
                                    'format'        => 'raw' ,
                                    'filter'        => FALSE ,
                                    'value'         => function ( $model ) {
                                        return Html::img( IMG_URL . $model->image , [
                                            'style' => 'width:65px;height:50px;' ,
                                        ] );
                                    } ,
                                    'headerOptions' => [  'style' => ['width' => '60','color'=>'#337ab7' ]] ,
                                ] ,

                                'price',
                                'all_price',
                            ] ,
                        ] ); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="application/javascript" src="/js/public.js"></script>
<script type="application/javascript">
    imageMax();
</script>
